package com.example.demo.controller;

import com.example.demo.model.service.OperateRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class historyRecord {
    private final static String AWeekRecord = "/admin/weekRecord";
    private final static String AWeekRecordPage = "weekRecord";
    @Autowired
    private OperateRecordService service;
    @GetMapping(AWeekRecord)
    public String getAWeekRecord(HttpServletRequest request)
    {
        request.setAttribute("records",service.getWeekOperateRecord());
        return AWeekRecordPage;
    }
}
